# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=php7-pecl-psr
_pkgreal=psr
pkgver=1.0.0
pkgrel=1
pkgdesc="PECL extension provides the accepted PSR interfaces, so they can be used in an extension."
url="https://pecl.php.net/package/psr"
arch="all"
license="BSD-2-Clause"
depends="php7-common"
makedepends="php7-dev autoconf re2c"
source="https://pecl.php.net/get/$_pkgreal-$pkgver.tgz"
builddir="$srcdir/$_pkgreal-$pkgver"
provides="php7-psr=$pkgver-r$pkgrel" # for backward compatibility
replaces="php7-psr" # for backward compatibility

build() {
	phpize7
	./configure --prefix=/usr --with-php-config=php-config7
	make
}

check() {
	make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test
}

package() {
	make INSTALL_ROOT="$pkgdir"/ install
	install -d "$pkgdir"/etc/php7/conf.d
	echo "extension=$_pkgreal.so" > "$pkgdir"/etc/php7/conf.d/$_pkgreal.ini
}

sha512sums="762278e922c03102dddb39b7997c70803c2105bffa231db20da8c246e10788803765068bbd859f2b7cad1e4fb64e91d191be55917dc14af49c8cd1211d007649  psr-1.0.0.tgz"
